<?php
abstract class FileFilter {
	protected $filteredFiles = array();
	function __construct($files) {	
		$this->addFiles($files);
	}
	function addFiles($files){
		foreach ($files as $f) {
			if ($this->matcher($f) === true) 
				$this->filteredFiles[] = $f;
		}
	}
	
	abstract protected function matcher($filename);
	
	function getFiles(){
		return $this->filteredFiles;
	}
}  


?>